var express = require('express');
var AnserModel = require('../db/answerModel')

module.exports = async function (req, res) {
    var id = req.params.id
    await AnserModel.remove({id: id}, function (error) {
        if (error) {
            res.status(400).send({
                status: 400,
                message: "删除失败"
            })
        }
    })
    res.send({
        status: 200,
        message: "删除成功"
    })
}